- 
                Notifications
    You must be signed in to change notification settings 
- Fork 641
          Remove sx props and BoxWithFallback from TooltipV2 and Tooltip
          #6667
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| 🦋 Changeset detectedLatest commit: e7d506a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
 Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR | 
| 👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! | 
| size-limit report 📦
 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the deprecated sx prop support from both Tooltip and TooltipV2 components as part of a major release. The changes align with the design system's move away from styled-system props in favor of more maintainable styling approaches.
Key Changes
- Removed sxprop from bothTooltipandTooltipV2component type definitions
- Replaced BoxWithFallbackwith nativespanelement inTooltipV2
- Cleaned up styled-components integration in legacy Tooltip
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description | 
|---|---|
| packages/react/src/TooltipV2/Tooltip.tsx | Removed SxPropimport and type, replacedBoxWithFallbackwithspan | 
| packages/react/src/TooltipV2/Tooltip.docs.json | Removed sxprop from component documentation | 
| packages/react/src/Tooltip/Tooltip.tsx | Removed SxProptype andsxfunction from styled-component | 
| packages/react/src/Tooltip/Tooltip.docs.json | Removed sxprop from component documentation | 
| .changeset/pink-rockets-win.md | Added changeset entry for major version bump | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
| const Tooltip: ForwardRefExoticComponent<TooltipProps & RefAttributes<HTMLDivElement>> = forwardRef< | ||
| HTMLDivElement, | ||
| TooltipProps | ||
| >(function Tooltip(props, ref) { | ||
| return <Box as={PrimerTooltip} ref={ref} {...props} /> | ||
| }) | ||
|  | ||
| export {Tooltip, type TooltipProps} | ||
|  | ||
| type DeprecatedTooltipProps = PrimerDeprecatedTooltipProps & SxProp | ||
|  | ||
| function DeprecatedTooltip(props: DeprecatedTooltipProps) { | ||
| return <Box as={PrimerDeprecatedTooltip} {...props} /> | ||
| } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we do the new as hack just in case? I think in theory it affects every component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this only affects polymorphic components that take an as prop, Tooltip isn’t one of them, so it should be fine.
I tested it in primer-react.browser.test.tsx and confirmed that the props and children are passed correctly for Tooltip.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah got it, thanks! ❤️
sx props and BoxWithFallback from TooltipV2 and Tooltipsx props and BoxWithFallback from TooltipV2 and Tooltip
      | 👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! | 
| 👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! | 
| 👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/3596 | 
| 🟢 ci completed with status  | 
sx props and BoxWithFallback from TooltipV2 and Tooltipsx props and BoxWithFallback from TooltipV2 and Tooltip
      
Wait until this PR is merged in
github-ui: https://github.com/github/github-ui/pull/3366Closes #5769
0 repo are still using
sxprops withTooltip.Changelog
Removed
Removed
sxprops from deprecatedTooltipandTooltipV2Rollout strategy